home *** CD-ROM | disk | FTP | other *** search
/ Totally AMOS / Totally AMOS - Issue 1 (1991-11)(Tucker, Len - Tucker, Anne).adf / programming / alert_box.seq next >
Text File  |  1991-09-02  |  3KB  |  71 lines

  1.  68
  2. eca00007cf00fe008033300f70f
  3. ^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
  4.  
  5.                          ^2@3ALERT BOX ROUTINE.@
  6.  
  7.                 ^4[4Original Routine by Aaron Fothergill.[0
  8.  
  9.               ^6[4Additional coding and graphics by SPARX.[0
  10.  
  11. ^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
  12.  
  13. ^7 This  Alert  box routine is one that we use very often and which you
  14. ^7might have seen in some of our programs.
  15.  
  16. ^6 If you are not familiar with the term 'alert box' it is another term
  17. ^6for the annoying little box that pops up in programs asking if you're
  18. ^6sure  that  you  want  to  do what you've just decided to do!  On the
  19. ^6positive  side, they do stop you from making silly mistakes!  Our pet
  20. ^6name for them is "Idiot detectors!'
  21.  
  22. ^4 This  is  another  routine that will help to make your programs look
  23. ^4more  professional.   The  box that is displayed looks good and gives
  24. ^4the user the opportunity to check what he has done, it is very useful
  25. ^4in programs which are aimed at beginners and especially children, who
  26. ^4can easily select the wrong function.
  27.  
  28. ^1 The  main  routine was written by Aaron Fothergill, we spotted it in
  29. ^1[2Sprite-X, [0 liked  it,  and decided to make it prettier.  It now looks
  30. ^1indented, and has indented buttons for the responses.
  31.  
  32. ^7 The  procedure  can  be merged into your own program and called when
  33. ^7you need it.
  34.  
  35. ^6 There  are  limits  to  the length of the text line, but as there is
  36. ^6room  for  22-25  characters  per  line, and 10 lines in total, there
  37. ^6should  not be any problems.  It has been set up for two buttons, but
  38. ^6that  shouldn't  stop  you  fiddling with the coding to set it up for
  39. ^6more or fewer buttons.
  40.  
  41. ^4 You  can  further  customise  the  panel, by changing the colours to
  42. ^4coordinate  with  your  program.   You can alter this by changing the
  43. ^4line under the ** starred ** REM line.
  44.  
  45. ^2 "Q"  is  the  variable that tells you which button has been pressed.
  46. ^2If  q=1,  then  button  1 has been pressed, if q=2, then button 2 has
  47. ^2been pressed.
  48.  
  49. ^7 The  routine  has  been  written  in  a way that the least amount of
  50. ^7memory  will  be  used.   The  screen  is  4 colour, low res, and the
  51. ^7routine only opens a screen large enough to display the box.
  52.  
  53. ^3 To save more memory, take out all the REM lines!!
  54.  
  55. ^6 The whole thing only eats up 4000 bytes, so it is worth including in
  56. ^6any program that needs it.
  57.  
  58. ^4 The routine has been used in the new PRINT facility in this issue of
  59. ^4[2TOTALLY  AMOS.   [0If  you want to print out an article, then press 'P'
  60. ^4while  viewing  an  article,  NOT  an index page.  The alert box will
  61. ^4appear asking if the printer is ready.  Press button 1 to continue, 2
  62. ^4to cancel.
  63.  
  64. ^2 If you modify the routine, or better it, then let us (and Aaron) see
  65. ^2it, and it might be included on the disk as an upgrade.
  66.  
  67. ^1 If you use this routine, pleases remember to credit the authors!
  68.  
  69. ^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
  70. \
  71.